package com.yh.serviceimpl;

import com.yh.dao.OrdersDao;
import com.yh.javabean.Orders;
import com.yh.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OrdersServiceImpl implements OrdersService {
    @Autowired
    OrdersDao ordersDao;
    @Override
    public List<Orders> findAll() {
        return ordersDao.selectAll();
    }

    @Override
    public Orders findById(int id) {
        return ordersDao.selectById(id);
    }
    @Override
    public List<Orders> findAll(String orderNum, String productName) {
        return ordersDao.selectAllKey(orderNum,productName);
    }
}
